/* ============ 提示框 ============ */

.tooltip {
    position: fixed;
    z-index: 1000;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: tooltipFadeIn 0.2s ease-in-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============ 主题 ============ */

.tooltip.tooltip-dark {
    background: #333333;
    color: white;
    border: 1px solid #555555;
}

.tooltip.tooltip-light {
    background: white;
    color: #333333;
    border: 1px solid #d9d9d9;
}

/* ============ 内容 ============ */

.tooltip-inner {
    display: block;
}

/* ============ 箭头 ============ */

.tooltip-arrow {
    position: absolute;
    width: 6px;
    height: 6px;
    background: inherit;
    border: inherit;
    transform: rotate(45deg);
}

.tooltip[data-placement="top"] .tooltip-arrow {
    bottom: -4px;
    left: 50%;
    margin-left: -3px;
    border-top: none;
    border-left: none;
}

.tooltip[data-placement="bottom"] .tooltip-arrow {
    top: -4px;
    left: 50%;
    margin-left: -3px;
    border-bottom: none;
    border-right: none;
}

.tooltip[data-placement="left"] .tooltip-arrow {
    right: -4px;
    top: 50%;
    margin-top: -3px;
    border-left: none;
    border-bottom: none;
}

.tooltip[data-placement="right"] .tooltip-arrow {
    left: -4px;
    top: 50%;
    margin-top: -3px;
    border-right: none;
    border-top: none;
}

/* ============ 响应式 ============ */

@media (max-width: 768px) {
    .tooltip {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .tooltip {
        padding: 5px 8px;
        font-size: 11px;
        max-width: 150px !important;
    }
}
